# 获取省
def getProvince():
    with open('assets/province.json',mode='r',encoding='utf-8') as r:
        province = r.read()
    return eval(province)

# 根据省id返回对应的市
def getCity(province_id):
    with open('assets/city.json',mode='r',encoding='utf-8') as r:
        city = eval(r.read())

    return city[province_id]

# 根据市id返回对应的县
def getArea(city_id):
    with open('assets/area.json',mode='r',encoding='utf-8') as r:
        area = eval(r.read())

    return area[city_id]